
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<s:fielderror/>
<form action="ups.action" method="post" enctype="multipart/form-data">
    <table id="tab">
       <tr>
           <td>选择文件<input type="file" name="uploads"></td>
       </tr>
        <tr>
            <td>
                <input value="上传" type="submit">
                <input type="button" value="添加一个上传文件" onclick="insertRow()">
            </td>
        </tr>


    </table></form>
<script>
    function insertRow() {
      var myTab=  document.getElementById("tab");
      var newRow=  myTab.insertRow(myTab.rows.length-1);
      newRow.insertCell(0).innerHTML="选择文件<input type=\"file\" name=\"uploads\">"
    }
</script>
</body>
</html>
